<template>
    <div>
        <h2>{{ a }},{{ b }},{{ c }},{{ p }}</h2>
    </div>
</template>

<script lang="ts" setup name="ElemRef">

import { ref, defineExpose } from 'vue'

let a = ref('a')
let b = ref('b')
let c = ref('c')
let p = ref('p')

// 把数据交给外部
defineExpose({ a, b, c })

</script>